const app = getApp()

module.exports = (url, data) => {
  return new Promise((resolve, reject) => {
    wx.request({
      url: app.config.apiBase + url, 
      data,
      success: resolve,
      fail: reject,
    })
  })
}
